package exchange;

public class DoIt {

	/**
	 * @param args
	 */

	public static void main(String[] args) {
		A a1 = new A();
		A a2 = new A();
		B b = new B();
		int trials = 100;

		for (int i = 1; i < trials; i++) b.doIt(a1);
		for (int i = 1; i < trials; i++) b.doItOnAnotherThread(a2);
		System.out.println("doIt 		   , Dollars: " + a1.getValueInDollars());
		System.out.println("doItOnAnotherThread, Dollars: "
				+ a1.getValueInDollars());

	}

}
